From: Keir Fraser Date: Tue, 16 Jun 2009 10:39:02 +0000 (+0100) Subject: xend: pass-through: Use PCIDevice as the parameter for the constructor for PCIQuirk X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13766 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:///%22http:/www.example.com/cgi/%22https:/?a=commitdiff_plain;h=bf17cf4c4c87685fc04d752c5d3cc77d2afc3c57;p=xen.git xend: pass-through: Use PCIDevice as the parameter for the constructor for PCIQuirk Signed-off-by: Simon Horman --- diff --git a/tools/python/xen/xend/server/pciif.py b/tools/python/xen/xend/server/pciif.py index 0806905ea0..c84d655143 100644 --- a/tools/python/xen/xend/server/pciif.py +++ b/tools/python/xen/xend/server/pciif.py @@ -301,8 +301,7 @@ class PciController(DevController): # if arch.type != "ia64": # dev.do_FLR() - PCIQuirk(dev.vendor, dev.device, dev.subvendor, dev.subdevice, domain, - bus, slot, func) + PCIQuirk(dev) if not self.vm.info.is_hvm(): # Setup IOMMU device assignment diff --git a/tools/python/xen/xend/server/pciquirk.py b/tools/python/xen/xend/server/pciquirk.py index da7aa9a057..71e9410d80 100644 --- a/tools/python/xen/xend/server/pciquirk.py +++ b/tools/python/xen/xend/server/pciquirk.py @@ -11,18 +11,19 @@ PERMISSIVE_CONFIG_FILE = auxbin.xen_configdir() + "/xend-pci-permissive.sxp" PERMISSIVE_SYSFS_NODE = "/sys/bus/pci/drivers/pciback/permissive" class PCIQuirk: - def __init__( self, vendor, device, subvendor, subdevice, domain, bus, slot, func): - self.vendor = vendor - self.device = device - self.subvendor = subvendor - self.subdevice = subdevice - self.domain = domain - self.bus = bus - self.slot = slot - self.func = func + def __init__(self, dev): + self.vendor = dev.vendor + self.device = dev.device + self.subvendor = dev.subvendor + self.subdevice = dev.subdevice + self.domain = dev.domain + self.bus = dev.bus + self.slot = dev.slot + self.func = dev.func - self.devid = "%04x:%04x:%04x:%04x" % (vendor, device, subvendor, subdevice) - self.pciid = "%04x:%02x:%02x.%01x" % (domain, bus, slot, func) + self.devid = "%04x:%04x:%04x:%04x" % (self.vendor, self.device, + self.subvendor, self.subdevice) + self.pciid = dev.name self.quirks = self.__getQuirksByID() self.__sendQuirks()